package com.ibuonline.b2b.channel.service;

import java.util.List;

import com.dimeng.common.base.BaseServiceImpl;
import com.ibuonline.b2b.channel.dao.HotCompanyDAO;
import com.ibuonline.b2b.entity.ChannelHotCompany;

public class HotCompanyServiceImpl extends
		BaseServiceImpl<ChannelHotCompany> implements HotCompanyService {
	public List<ChannelHotCompany> getListByChannelType(String channelType){
		String hql = "from ChannelHotCompany where channel=? order by displayOrder";
		this.setCacheQueries(false);
		List<ChannelHotCompany> list = ((HotCompanyDAO)dao).query(hql, channelType);
		this.setCacheQueries(true);
		return list;
	}
	
	public List<ChannelHotCompany> getFrontByChannel(String channel,int size){
		String hql = "from ChannelHotCompany where channel=? order by displayOrder ";
		return ((HotCompanyDAO)dao).query(hql, channel, 0, size);
	}
}
